package com.dropgame.screens;

import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.dropgame.main.AssetLoader;
import com.dropgame.main.DropGame;
import com.dropgame.tools.InvertedInput;
import com.dropgame.tools.TransitionEffect;
import com.dropgame.world.GameWorld;

public class GameScreen implements Screen{

	DropGame game;
	OrthographicCamera guiCam;
	SpriteBatch batcher;
	InvertedInput input;
	TransitionEffect transitionEffect;
	GameWorld gameWorld;
	int score;
	int level;
	
	public GameScreen(DropGame game, int level){
		this.game = game;
		this.level = level;
		guiCam = new OrthographicCamera(320, 480);		
		guiCam.position.set(320 / 2, 480 / 2, 0);
		//gameBackGround = AssetLoader.gameBackgroundRegion;
		batcher = new SpriteBatch();
		input = new InvertedInput();
		transitionEffect = new TransitionEffect(game);
		gameWorld = new GameWorld(level);
		score = gameWorld.score;
	}
	
	

	@Override
	public void render(float deltaTime) {
		gameWorld.renderworld();
		//gameWorld.processMouseJoint();
		gameWorld.processRemovals();
		gameWorld.destroyToxicMouse();
		System.out.println("The score is :" + gameWorld.score);
	}

	@Override
	public void resize(int arg0, int arg1) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		
	}
	
	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

}
